const getTime = ()=>{
  const date = new Date()
  let h = date.getHours().toString();
  let m = date.getMinutes().toString();
  let s = date.getSeconds().toString();
  h = '' + (h.length == 1 ? '0':'') + h
  m = '' + (m.length == 1 ? '0':'') + m
  s = '' + (s.length == 1 ? '0':'') + s
  console.log('' + h + ':' + m +':' + s)
  return '' + h + ':' + m +':' + s
}

export default {
  state: {
    v_receivableAmt: undefined,
    v_amt: undefined,
    v_oilName: undefined,
    v_time:'',
    v_stationName:'',
    dialogueAdFlag:'',
  },
  getters: {},
  mutations: {
    updateVoucherInfo(state, voucherInfo) {
      state.v_receivableAmt = voucherInfo.receivableAmt;
      state.v_amt = voucherInfo.amt;
      state.v_oilName =  voucherInfo.oilName;
      state.v_stationName =  voucherInfo.stationName;
      state.v_time = getTime();
    },
    updateDialogueAdFlag(state,dialogueAdFlag){
      state.dialogueAdFlag = dialogueAdFlag
    }
  },
  actions: {

  }
}
